﻿using Lhz.Common.Service;
using Lhz.Data.Linq.Nh;
using Lhz.Sc.Business;
using Lhz.Sc.Entity.Database;
using Lhz.Sc.Interface;
using System;
using System.Collections.Generic;

namespace Lhz.Sc.Service
{
    public class ServiceAuthorization : EntityService<AuthorizationProxy, Guid, Authorization>, IServiceAuthorization
    {
        public ServiceAuthorization() : base(new AuthorizationProxy())
        {

        }

        public List<Authorization> QueryByUserGuid(Guid userGuid, string[] paths)
        {
            return entityProxy.QueryByUserGuid(userGuid).LoadByPathsAndClearProxyAndRestoreProxyData(paths);
        }

        public void DeleteByUserGuid(Guid userGuid)
        {
            entityProxy.DeleteByUserGuid(userGuid);
        }
    }
}
